/**
* Fetch nested keys
* @param {Map} $map - Map
* @param {Arglist} $keys - Keys to fetch
* @return {*}
*/
@function map-deep-get($map, $keys...) {
  @each $key in $keys {
    $map: map-get($map, $key);
  }

  @return $map;
}

@mixin noticejs-type($type) {
  .#{$type} {
    background-color: map-deep-get($types, $type,'bg');
    
    .noticejs-heading {
      background-color: map-deep-get($types, $type,'heading-bg');
      color: map-deep-get($types, $type,'text-color');
      padding: $item-padding;
    }

    .noticejs-body {
      color: map-deep-get($types, $type,'text-color');
      padding: $item-padding;
      &:hover{
        visibility: visible !important;
      }
    }

    .noticejs-content{
      visibility: visible;
    }
  }
}

@mixin noticejs-progressbar($type) {
  .#{$type} {
    .noticejs-progressbar{
        width: 100%;
        background-color: map-deep-get($types, $type,'progressbar-bg');
        margin-top: -1px;
        .noticejs-bar{
            width: 100%;
            height: $progressbar-height;
            background: map-deep-get($types, $type,'progressbar-color');
        }
    }
  }
}
